/*************************************************************************
	> File Name: proxy.h
	> Author: ma6174
	> Mail: ma6174@163.com 
	> Created Time: 2021年11月24日 星期三 19时55分38秒
 ************************************************************************/

#include<iostream>
#include <string>

class SchoolGirl
{
public:
	SchoolGirl(std::string mm) : name(mm) {}

	void setName(std::string mm)
	{
		this->name = mm;
	}

	std::string getName()
	{
		return name;
	}

private:
	std::string name;
};

class IGiveGift
{
public:
	virtual void GiveDolls() = 0;
	virtual void GiveFlowers() = 0;
	virtual void GiveChocolate() = 0;
};

class Persuit : public IGiveGift
{
public:
	Persuit(SchoolGirl m) : mm(m) {}

	virtual void GiveDolls()
	{
		std::cout << mm.getName() << "，送你洋娃娃！" << std::endl; 
	}

	virtual void GiveFlowers()
	{
		std::cout << mm.getName() << "，送你花花！" << std::endl;
	}

	virtual void GiveChocolate()
	{
		std::cout << mm.getName() << "，送你巧克力！" << std::endl;
	}

private:
	SchoolGirl mm;
};

class Proxy : public IGiveGift
{
public:
	Proxy(SchoolGirl mm)
	{
		gg = new Persuit(mm);
	}

	virtual void GiveDolls()
	{
		gg->GiveDolls();
	}

	virtual void GiveFlowers()
	{
		gg->GiveFlowers();
	}

	virtual void GiveChocolate()
	{
		gg->GiveChocolate();
	}

private:
	Persuit* gg;
};
